package top.whk0710.other.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class ProxySubject implements InvocationHandler{

	private RealSubject sub;
	
	public ProxySubject(RealSubject sub) {
		this.sub = sub;
	}
	
	@Override
	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		System.err.println("come before...");
		return method.invoke(sub, args);
	}

}
